package main.app.model
{
	import main.app.model.models.LoginModel;

	public class CenterModel
	{
		static private var instance:CenterModel;
		
		static public function getInstance():CenterModel
		{
			if (!instance) instance = new CenterModel(new one());
			
			return instance;
		}
		
		public function CenterModel(p:one) 
		{
			if (!p)
			{
				/**
				 * 报错后,如果捕获    则返回为 null
				 * 如果未捕获    则直接挂掉,O(∩_∩)O~
				 */
				throw new Error("SingleClass不能直接new , 用静态方法 getInstance()!");
			}
		}
		
		public var loginModel:LoginModel = new LoginModel();
	}
}
class one { }